]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
osdWindow: always round-up sizes when updating allocation
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 10 Oct 2016 23:59:31 +0000 (16:59 -0700)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 11 Oct 2016 00:24:52 +0000 (17:24 -0700)
This fixes the OSD window flickering horizontally at certain
resolutions.

https://bugzilla.gnome.org/show_bug.cgi?id=772287

js/ui/osdWindow.js

index 432ea9af73095a1ec1f2d91f976cd612ab7b79c2..4c2b00b22fb72cbef26b54ac15096ff3a06d986d 100644 (file)
@@ -72,8 +72,8 @@ const OsdWindowConstraint = new Lang.Class({
 
         // Recenter
         let [x, y] = actorBox.get_origin();
-        actorBox.set_origin(Math.floor(x + width / 2 - size / 2),
-                            Math.floor(y + height / 2 - size / 2));
+        actorBox.set_origin(Math.ceil(x + width / 2 - size / 2),
+                            Math.ceil(y + height / 2 - size / 2));
     }
 });